package com.hspedu.newData.dmsxl.链表;

import com.hspedu.newData.dmsxl.ds.ListNode;

/**
 * @Author: yh
 * @description: 
 * @CreateTime: 2025-05-14 
 * @Version: 1.0
 */

public class LC237删除链表中的结点 {

    public void deleteNode(ListNode node) {


        while (node.next != null){
            node.val = node.next.val;
            node = node.next;
        }

        node = null;
    }
}
